package concurrent;

/**
 * Created by yangyang on 2017/5/23 22:34.
 */
public class SerialNumberGenerator {
    private static volatile int serialNumber = 0;
    public static int nextSerialNumber() {
        return serialNumber++; // not thread safe
    }
}
